<?php
$selected_region_setting = array(
    'table_name' => 'animus_sub_region',
    'key_field' => 'id',
    'value_field' => 'name',
    'init_data'=>array('key'=>'','name'=>'(Select region)')
);
$selected_region = isset($selected_region)?$selected_region:"";
?>
<div id="nouveaux_membres">
<div class="titre_home" style="text-transform: uppercase;">Liste des parcs</div>
    <?php echo form_open('parkway/search_parkway'); ?>
    <div align="center">
        <table>
            <tr>
                <td>Choisir la région:</td>
                <td><?php echo form_dropdown('search_region',dropdown_data($selected_region_setting),$selected_region,'style="width:150px;"')?></td>
                <td><input type="submit" name="search" value="Recherche" /></td>
           </tr>
        </table>
    </div>
    <?php echo form_close(); ?>
    <?php if($total>0){?>
    <table align="center" width="100%" >
        <?php foreach ($query as $aRow): ?>
        <?php
            $image = './assets/parkway/' . $aRow['image'];
            if (file_exists($image)) {
                $image = base_url() . 'assets/parkway/' . $aRow['image'];
            } else {
                $image = root_url('doggy-flirt') . './assets/noimage.gif';
            }
        ?>
            <tr>
                <td colspan="2" style="font-size: x-large; text-transform: capitalize;">
                <a href="<?php echo site_url('parkway/detail_parkway').'/'.$aRow['id']?>" style="color: #5d94c5;"><?php echo $aRow['name'] ?></a>
            </td>
        </tr>
        <tr>
            <td rowspan="2" width="10%" valign="middle">
                <a href="<?php echo site_url('parkway/detail_parkway').'/'.$aRow['id']?>"><img border="0" width="80px" src="<?php echo $image; ?>" alt=""/></a>
            </td>
        </tr>
        <tr>
            <td width="50%" align="left"><?php echo get_short_description($aRow['description'], 30) ?></td>
        </tr>
        <tr>
        	<td colspan="2" align="right" style="padding-right: 10px;"><a href="<?php echo site_url('parkway/detail_parkway') . '/' . $aRow['id'] ?>">Lire la suite »</a></td>
        </tr>
        <?php endforeach; ?>
    </table>
    <?php echo $pagination; ?>
    <?php }else{?>
    <h3>Désolé! Il n'y a aucun résultat correspondant à votre recherche.</h3>
    <?php }?>
</div>
<!--END wrapper-content-->

